import { defineStore } from 'pinia'

const useLayOutSettingStore = defineStore('SettingStore', {
  state: () => {
    return {
      isCollapse: false,
      refsh: false,
    }
  },
  actions: {
    changeCollapse() {
      this.isCollapse = !this.isCollapse
    },
    changeRefresh() {
      this.refsh = !this.refsh
    },
  },
  persist: {
    enabled: true, // true 表示开启持久化保存,
    /*存储策略*/
    strategies: [
      // { storage: sessionStorage, paths: ['name'] },
      // { storage: localStorage, paths: ['age'] },
    ],
  },
})

export default useLayOutSettingStore
